#include <iostream>

using namespace std;

int main()
{
	long day;
	long hour;
	long min;
	long sec;
	
	long input;
	
	cout << "Enter the number of seconds: ";
	cin >> input;
	
	day = input / (60 * 60 * 24);
	hour = (input % (60 * 60 * 24) / 3600);
	min = (((input % (60 * 60 * 24)) % 3600) / 60) % 60;
	sec = (((input % (60 * 60 * 24)) % 3600) % 60) % 60;
	
	cout << day << " days " 
	<< hour << " hours " 
	<< min  << " minutes " 
	<< sec << " seconds" << endl;
	
	return 0;
}